<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Prettus\Repository\Contracts\Transformable;
use Prettus\Repository\Traits\TransformableTrait;

/**
 * Class RatingSubitem.
 *
 * @package namespace App\Models;
 */
class RatingSubitem extends Model implements Transformable
{
    use TransformableTrait;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = ['category_id', 'subitem_name', 'subitem_score'];

    public function ratingCategory()
    {
        return $this->belongsTo(RatingCategory::class, 'category_id');
    }
}
